<?php
class cms
{
    public $id;
    public $code;
	public $title;
	public $content;
	
	function cms($_id, $_code, $_title, $_content){
            $this->id = $_id;
            $this->code = $_code;
            $this->title = $_title;
            $this->content = $_content;
	}
}
function validateCode($code){
		//if it's NOT valid
		if(strlen($code) < 4)
			return false;
		//if it's valid
		else
			return true;
	}
	function validateTitle($title){
		//if it's NOT valid
		if(strlen($title) < 4)
			return false;
		//if it's valid
		else
			return true;
	}
	function validateContent($text){
		//if it's NOT valid
		if(strlen($text) == 0)
			return false;
		//if it's valid
		else
			return true;
	}
?>